<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" async="" src="javascript:void(0)"></script>
<script type="text/javascript" async="" src="{{asset('/HomeCss/guo/presadv')}}"></script>

<script async="" src="{{asset('/HomeCss/guo/10402.js')}}"></script>
<script async="" src="{{asset('/HomeCss/guo/10119.js')}}"></script>
<script async="async" src="{{asset('/HomeCss/guo/a_002')}}"></script>


<script async="" src="{{asset('/HomeCss/guo/a.js')}}"></script>
    

    
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="applicable-device" content="pc">
    <meta name="keyword" content="">
    <meta name="description" content="">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>超越战神</title>
    <link rel="dns-prefetch" href="#/">
    <link rel="dns-prefetch" href="#/">
    <link rel="dns-prefetch" href="#">
    <link rel="dns-prefetch" href="#">
    <link rel="canonical" href="#">
    <link rel="alternate" media="only screen and(max-width: 640px)" href="">
    <link rel="shortcut icon" href="" type="image/x-icon">

    
 <script type="text/javascript" src='/jquery-1.8.3.min.js'></script>   
<script type="text/javascript">var gfeJsCdn="//js.gomein.net.cn",gfeCssCdn="//css.gomein.net.cn",gfeProjectPath="/gmpro/2.0.0/cart/1.0.0";</script>
<link rel="stylesheet" href="{{asset('/HomeCss/guo/a.css')}}">
<link rel="stylesheet" href="{{asset('/HomeCss/guo/a_002.css')}}">
<link rel="stylesheet" href="/HomeCss/bootstrap/bootstrap.min.css">
<script type="text/javascript" src="/HomeCss/bootstrap/jquery.min.js"></script>
<script type="text/javascript" src="/HomeCss/bootstrap/bootstrap.min.js"></script>

</head>
<body class="w990" data-page="cart">
   
<!--gome_top-->
<div id="gome-head" class="wbox" >
    <br>
    <br>
    <div  style="color:#369; "><h1>结算页</h1></div>
    <div id="head-box"></div>
</div>
<!--gome_head -->
<!--head-->
    <!--收获人信息-->
    <div><img src="/HomeCss/images/2.gif" alt="" style="position:absolute;right:240px;top:160px"></div>   
    <div class="container receiver-info clearfix" id="address">
        <div class="clearfix" style="line-height:22px;"> 
          <h3 class="title-color font14 fl">     收货人信息   </h3>      
             <div class="newaddress fr" id="id_newAddress_btn" style="height:22px;line-height:22px;">  
               <a class="new_add clearfix i-block" href="javascript:void(0)" style="line-height:22px;" tpmmtag="选择地址|100|2">     
                  
                   <span class="fl i-block">
                       <button type="button" style="text-decoration:none;"class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                          添加新地址
                        </button>
                   </span>    
                </a>
                </div>     
                </div>
           <!-- <button type="button" data-toggle="modal" data-target="#myModal">新增收货人地址</button> -->
              
               <div class="nInfos pr" id="addname" style="padding-bottom:29px;">        
               <div id="addressBox" class="addname-warp">                        
               <div class="pr over_flow">                                      
               <ul class="addname" g-scroll="" style="top:0px;">                                         
               @foreach($adds as $k=>$v)
               <li class="infofirst clearfix pr" id="{{$v->id}}" g-hover-up="" style=" height:50px;line-height:50px;text-align:center; font-size:25xp;padding-bottom:1px;">              
               <input type="hidden" name="id" value="{{$v->id}}" />
               <!-- <span class="badge">√</span>                -->
                                 
                                              
                              
               <span class="name name_over2 fl" name="recc">{{$v->rec}}</span>
               <span class="area_over fl w45"style="width:150px;text-align:center;" name="shengg">{{$v->sheng}}</span>                  
               <span class="j-cityname mr10" name="shii" >{{$v->shi}}</span>          
               <span class="deadd mr10 i-block" name="xiann">{{$v->xian}}</span>         
               <span class="deadd mr10 i-block" name="addrr">{{$v->addr}}</span>         
               <span class="tp-cell" name="phonee">                    {{$v->phone}}                   </span>                        
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>                 
                <span class="shanchu" style="color:red" >删除</span>                                 
             
                </li>        
                @endforeach    
               
                <br>
                </ul>    
                </div>      
                 </div>        </div>
    </div>
       
        <!-- ===========================  -->

        <!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                <span aria-hidden="true">&times;</span>
                <span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">详细地址</h4>
              </div>
                @if (count($errors) > 0)
                              <div class="alert alert-danger">
                                  <ul>
                                      @foreach ($errors->all() as $error)
                                          <li>{{ $error }}</li>
                                      @endforeach
                                  </ul>
                              </div>
                 @endif
              <div class="modal-body">
              <!-- ===== -->
        <!-- Button trigger modal -->

              <div class="widget-box">
                    <div class="widget-content nopadding">
                          
                          <form class="form-horizontal" method="post" action="">
                            <div class="control-group">
                              <label class="control-label"  style="font-size:20px">
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收件人:</label>
                              <br>
                              <div class="controls">
                                
                                
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <input  type="text" name="rec" placeholder="请输入收件人姓名(1-16位)" readmin="请输入1到18位收件人名" value="{{old('rec')}}" 
                                 style="border:1px solid #989;width:300px; height:35px">
                                 <span></span>
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label" style="font-size:20px">
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;联系电话:</label>
                              <div class="controls">
                               
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                 <input type="text" name="phone" placeholder="请输入联系电话" readmin="请输入11位数字号码"   style="border:1px solid #989;width:300px; height:35px">
                              <span></span>
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label" style="font-size:20px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邮政编码:</label>
                              <div class="controls">
                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                 <input type="textarea" name="yb" placeholder="请输入邮编" readmin="请输入6位数字邮编" value="{{old('yb')}}" placeholder="" style="border:1px solid #989;width:300px; height:35px">
                              <span></span>
                              </div>
                            </div>
                            <p></p>
                          <div>
                          <fieldset id="city_china_val">
                            
                            <label class="control-label" style="font-size:20px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;所在地区:</label>
                              <select id="sheng" class="province other" data-first-title="选择省">
                                <option  value="">请选择</option>
                                <option  name="sheng" value="{{old('sheng')}}" selected>浙江省</option>
                              </select>
                              <select id="shi" class="city" data-first-title="选择市">
                                <option  value="">请选择</option>
                                <option  name="shi" value="{{old('shi')}}" selected>杭州市</option>
                              </select>
                              <select id="xian" class="area" data-first-title="选择地区">
                                <option  value="">请选择</option>
                                <option  name="xian" value="{{old('xian')}}" selected>西湖区</option>
                              </select>
                            
                          </fieldset>
                              
                          </div>

                          <!-- <fieldset id="city_china_val">
                            <legend>多种设置默认值的方式</legend>

                            <p>方法一：使用 option 的 value 和 selected 属性</p>
                            <p><select class="province">
                              <option>浙江省</option>
                            </select></p>

                            <p>如果有多个 option ，需要使用 selected 属性指定选中项</p>
                            <p><select class="city">
                              <option>请选择</option>
                              <option value="杭州市" selected>杭州市</option>
                            </select></p>

                            <p>方法二：使用 select 的 data-value 属性</p>
                            <p><select class="area" data-value="西湖区">
                              <option>请选择</option>
                            </select></p>
                          </fieldset> -->
                              
                          

                        <script src="/HomeCss/sanji/jquery.cxselect.min.js"></script>
                        <!-- <script src="http://cdn.staticfile.org/zepto/1.0/zepto.min.js"></script> -->
                        <script src="/HomeCss/sanji/jquery.cxselect.js"></script>
                        <script>
                        (function() {
                          var urlChina = '/HomeCss/sanji/cityData.min.json';
                          var urlGlobal = '/HomeCss/sanji/globalData.min.json';
                          var dataCustom = [
                            {'v': '1', 'n': '第一级 >', 's': [
                              {'v': '2', 'n': '第二级 >', 's': [
                                {'v': '3', 'n': '第三级 >', 's': [
                                  {'v': '4', 'n': '第四级 >', 's': [
                                    {'v': '5', 'n': '第五级 >', 's': [
                                      {'v': '6', 'n': '第六级 >'}
                                    ]}
                                  ]}
                                ]}
                              ]}
                            ]},
                            {'v': 'test number', 'n': '测试数字', 's': [
                              {'v': 'text', 'n': '文本类型', 's': [
                                {'v': '4', 'n': '4'},
                                {'v': '5', 'n': '5'},
                                {'v': '6', 'n': '6'},
                                {'v': '7', 'n': '7'},
                                {'v': '8', 'n': '8'},
                                {'v': '9', 'n': '9'},
                                {'v': '10', 'n': '10'}
                              ]},
                              {'v': 'number', 'n': '数值类型', 's': [
                                {'v': 11, 'n': 11},
                                {'v': 12, 'n': 12},
                                {'v': 13, 'n': 13},
                                {'v': 14, 'n': 14},
                                {'v': 15, 'n': 15},
                                {'v': 16, 'n': 16},
                                {'v': 17, 'n': 17}
                              ]}
                            ]},
                            {'v': 'test boolean','n': '测试 Boolean 类型', 's': [
                              {'v': true ,'n': true},
                              {'v': false ,'n': false}
                            ]},
                            {v: 'test quotes', n: '测试属性不加引号', s: [
                              {v: 'quotes', n: '引号'}
                            ]},
                            {v: 'test other', n: '测试奇怪的值', s: [
                              {v: '[]', n: '数组（空）'},
                              {v: [1,2,3], n: '数组（数值）'},
                              {v: ['a','b','c'], n: '数组（文字）'},
                              {v: new Date(), n: '日期'},
                              {v: new RegExp('\\d+'), n: '正则对象'},
                              {v: /\d+/, n: '正则直接量'},
                              {v: {}, n: '对象'},
                              {v: document.getElementById('custom_data'), n: 'DOM'},
                              {v: null, n: 'Null'},
                              {n: '未设置 value'}
                            ]},
                            {'v': '' , 'n': '无子级'}
                          ];

                          $.cxSelect.defaults.url = urlChina;

                          // 默认
                          $('#city_china').cxSelect({
                            selects: ['province', 'city', 'area']
                          });

                          // 设置默认值及选项标题
                          $('#city_china_val').cxSelect({
                            selects: ['province', 'city', 'area'],
                            emptyStyle: 'none'
                          });

                          // 全球主要国家城市联动
                          $('#global_location').cxSelect({
                            url: urlGlobal,
                            selects: ['country', 'state', 'city', 'region'],
                            emptyStyle: 'none'
                          });

                          // 自定义选项
                          $('#custom_data').cxSelect({
                            selects: ['first', 'second', 'third', 'fourth', 'fifth'],
                            // required: true,
                            jsonValue: 'v',
                            data: dataCustom
                          });

                          // API 接口
                          var apiBox = $('#api_data');
                          var cxSelectApi;

                          apiBox.cxSelect({
                            selects: ['province', 'city', 'area']
                          }, function(api) {
                            cxSelectApi = api;
                          });

                          // cxSelectApi = $.cxSelect(apiBox, {
                          //   selects: ['province', 'city', 'area']
                          // });

                          $('body').on('click', 'button', function() {
                            var _name = this.name;
                            var _value = this.value;

                            switch (_name) {
                              case 'attach':
                                cxSelectApi.attach();
                                break;

                              case 'detach':
                                cxSelectApi.detach();
                                break;

                              case 'clear':
                                cxSelectApi.clear();
                                break;

                              case 'required':
                                cxSelectApi.setOptions({
                                  required: _value == 1 ? false : true
                                });
                                this.value = _value == 1 ? 0 : 1;
                                break;

                              case 'emptyStyle':
                                if (_value === 'none') {
                                  _value = 'hidden';
                                } else if (_value === 'hidden') {
                                  _value = '';
                                } else {
                                  _value = 'none';
                                };
                                cxSelectApi.setOptions({
                                  emptyStyle: _value
                                });
                                this.value = _value;
                                break;

                              case 'firstTitle':
                                _value = _value === '请选择' ? '选择吧' : '请选择';
                                cxSelectApi.setOptions({
                                  firstTitle: _value
                                });
                                this.value = _value;
                                break;

                              case 'setSelect':
                                cxSelectApi.setOptions({
                                  selects: _value === 'a' ? ['province', 'city', 'area'] : ['first', 'second', 'third', 'fourth', 'fifth']
                                });
                                this.value = _value === 'a' ? 'b' : 'a';
                                break;

                              case 'setData':
                                if (_value === 'china' || _value === 'global') {
                                  // $.ajax({
                                  //   url: this.value === 'china' ? urlChina : urlGlobal,
                                  //   type: 'GET',
                                  //   dataType: 'json'
                                  // }).done(function(data, textStatus, jqXHR) {
                                    cxSelectApi.setOptions({
                                      url: this.value === 'china' ? urlChina : urlGlobal,
                                      // data: data
                                    });
                                  // }).fail(function(jqXHR, textStatus, errorThrown) {
                                  // });

                                } else if (this.value === 'custom') {
                                  cxSelectApi.setOptions({
                                    data: dataCustom
                                  });
                                };
                                break;

                              // not default
                            };
                          });
                        })();
                        </script>

                            <!-- <div class="info">
                                <div>
                                <select id="s_province" name="s_province"></select>  
                                <select id="s_city" name="s_city" ></select>  
                                <select id="s_county" name="s_county"></select>
                                <script type="text/javascript" src="/HomeCss/sanji/area.js"></script>
                                
                                <script type="text/javascript">_init_area();</script>

                                </div>
                                <div id="show"></div>
                            </div>
                            <script type="text/javascript">
                                // var Gid  = document.getElementById ;
                                // var showArea = function(){
                                //     Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +    
                                //     Gid('s_city').value + " - 县/区" + 
                                //     Gid('s_county').value + "</h3>"
                                //                             }
                                // Gid('s_county').setAttribute('onchange','showArea()');
                            </script>
 -->

                            
                            <div class="control-group">
                              <label class="control-label" style="font-size:20px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;详细地址:</label>
                              <div class="controls">
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                 <textarea rows="5" name="addr" placeholder="请输入详细地址..." readmin="请输入详细地址" value="{{old('addr')}}" cols="50"></textarea><span></span>
                              </div>
                            </div>

                            {{csrf_field()}}
                              <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button  type="button" class="btn btn-primary tjaddress" name="guanbi" >添加</button>
                              </div>
                     </form>
                    </div>
                  </div>
                    <!-- === -->
              </div>
            </div>
          </div>
        </div>
    
    <!--支付方式-->
         <div class="container payment" id="payment">
   <h3 class="title-color font14">支付方式</h3> 
   <div class="content"> 
    <div class="clearfix ml40"> 
     <div class="fl pr mr15 zhifu" hoverup=""> 
      <a href="javascript:void(0)" class="btn pr btn-check btn-check mw120"> <span class="name">微信支付</span> <b class="c-i tips_icon pabs payway_tips hide" hover="" g-hoverup-tip="onlinePayment"></b> <i class="c-i chose_icon"></i> </a> 
      <div class="tips_detail pabs hide box-sd1" g-hover-tip="onlinePayment"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 支持大部分储蓄卡、信用卡及第三方平台支付 
       
      </div> 
     </div> 
     <div class="fl pr mr15 zhifu" hoverup=""> 
      <a href="javascript:void(0)" class="btn pr btn-check btn-check mw120"> <span class="name">货到付款</span> <b class="c-i tips_icon pabs payway_tips hide" hover="" g-hoverup-tip="cashOnDelivery" style="display: none;"></b> </a> 
      <div class="tips_detail pabs hide box-sd1" g-hover-tip="cashOnDelivery"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 支持现金、POS机刷卡 
       
      </div> 
     </div> 
     <div class="fl pr mr15 zhifu" hoverup=""> 
      <a href="javascript:void(0)" g-path="2" class="btn pr btn-check mw120" tpmmtag="选择支付方式|99|1"> <span class="name">信用卡分期</span> <b class="c-i tips_icon pabs payway_tips hide" hover="" g-hoverup-tip="installment" style="display: none;"></b> </a> 
      <div class="tips_detail pabs hide box-sd1" g-hover-tip="installment"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 支持大部分信用卡分期支付 
      </div> 
     </div> 
     <div class="fl pr mr15 zhifu" hoverup=""> 
      <a href="javascript:void(0)" g-path="3" class="btn pr btn-check mw120" tpmmtag="选择支付方式|99|1"> <span class="name">公司转账</span> <b class="c-i tips_icon pabs payway_tips hide" hover="" g-hoverup-tip="companyTransfer"></b> </a> 
      <div class="tips_detail pabs hide box-sd1" g-hover-tip="companyTransfer"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 支持银行柜台、企业银行转账 
      </div> 
     </div> 
     <div class="fl pr mr15 zhifu" hoverup=""> 
      <a href="javascript:void(0)" g-path="4" class="btn pr btn-check mw120" tpmmtag="选择支付方式|99|1"> <span class="name">支付宝支付</span> <b class="c-i tips_icon pabs payway_tips hide" hover="" g-hoverup-tip="mailRemittance" style="display: inline;"></b> </a> 
      <div class="tips_detail pabs hide box-sd1" g-hover-tip="mailRemittance"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 支持线下邮局汇款（上海地区除外） 
      </div> 
     </div> 
     <!--门店付款--> 
     <div class="fl pr mr15 zhifu" hoverup="" click-document-pre=""> 
      <a href="javascript:void(0)" class="btn pr btn-check mw120" code="storesPayment" tpmmtag="选择支付方式|99|1"> <span class="name max_w160">门店付款</span> <b class="c-i tips_icon pabs payway_tips2 hide" hover="" g-hoverup-tip="storesPayment"></b> </a> 
      <div class="tips_detail pabs hide del2 box-sd1" g-hover-tip="storesPayment"> 
       <i class="c-i arrowup pabs tips_arrow"></i> 门店支持现金、POS机刷卡 
      </div> 
      <div class="pr hide" id="mendianfukuan_tip" click-document-hide="" style="display: none;"> 
       <div class="pabs content_area  zi100 "> 
        <em class="pabs c-i arrowup"></em> 
        <a class="closed c-i closebtn-new pabs" href="javascript:void(0)" g-close=""></a> 
        <div id="mendianfukuan_store"></div> 
       </div> 
      </div> 
     </div> 
    </div> 
   </div>
  </div>     
    <!--送货清单-->
    <div class="container listOfItem" id="listOfItem"><div class="clearfix">      <h3 class="title-color font14 fl shopfontb">送货清单</h3>         
     <a href="{{asset('/home/cart/index')}}" id="back-cart" class="fr tip cl" style="margin-right:29px;">    返回购物车修改   </a>   
        <span href="javascript:void 0" class="fr tip pr30 cl pr" hoverup="">    <i class="c-i tips fl" style="margin:5px 5px 0px 0px;"></i>       <div class="pabs desc hide box-sd1" hover="" style="display: block;">     <i class="pabs c-i arrowup"></i>     因可能存在商品更新等不确定因素，具体售价以本结算页为准。如有疑问，请咨询客服。    </div>   </span>  </div>    <div class="infoH">      <!--国美自营购物车list-->   <div class="info-bd clearfix">    <!--购物车list-top-->    <div class="backStyle">     <span class="fr fontRed" style="top:0px;padding-right:29px;">     已节省<span class="font-cursive">¥</span>10.00     </span>     <span class="hcon">配送信息</span>                   </div>    <!--配送信息,商品清单-->    <div class="dilivery clearfix">     <!--配送信息left-->     <div class="sideleft fl" info-path="0">      <div class="all_listpay">    <div class="clearfix tittle mb15">     <h4 class="fl mr15 send_way">配送方式</h4>     <div class="goods_dy" map-item="">            <!--对应商品弹层开始-->      <div class="pr zi1000">       <div class="goods_fenlei pabs hide box-sd1" hover-1="">        <i class="c-i arrowup pabs tips_arrow"></i>                        <div class="fenlei_in">                        </div>       </div>      </div>      <!--对应商品弹层结束-->     </div>    </div>   </div>   <!--快递-->   <div class="Express clearfix">              <div class="dispatfont btn_Square_out mb15">      <div class="h28">              <a href="javascript:void(0)" class="btn btn-check btn-checked mw150 mr10">        <span class="name">普通快递</span>        <i class="c-i chose_icon"></i>       </a>                <span class="fontRed">免运费</span>                     </div>     </div>            </div>      <!--支付方式-->            <p class="valignp mt40" g-pipe="">   <span class="remarks fl">备注:</span>   <label class="rmarkLabel fl">    <input class="form-control" style="width:250px;" g-keyup="changeComment [g-keyup] [g-tip]" placeholder="最多输入30个字" type="text">   </label> 
          
          <span class="nWarings fl hide fontRed" g-tip="">&nbsp;&nbsp;最多输入30个字 </span>  </p>    </div>     <!--配送信息right-->     
          


        <form action="{{url('/home/order/insert')}}" method="post"> 
        <div>
   <div class="sideright fl" list-path="0"> 
    <div class="sideright fl"> 
     <div class="sideright_in"> 
      <ul class="gmlist clearfix"> 
       <li class="gmlist_li_over"> 
        <div class="pr"> 
        </div> 
        <div class="clearfix" style="font-size:17px; width:700px">
          @foreach($goods as $k=>$v) 
         <div class="goodss"> 
            <!-- 需要 商品数量 和 id -->
          <input type="hidden" name="gid[]" value="{{$v->gid}}" /> 
          <input type="hidden" name="buycnt[]" value="{{$v->buycnt}}" /> 

          <a class="imgLink mr10 fl" target="_blank" href=""> <img src="{{$v->gpic}}" width="80" height="80" /> </a> 
          <span class="fontGray mr10">有货</span> 
          <a href="" style="font-size:20px" class="p-name" target="_blank" title="">{{$v->gname}} </a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <span class="fontRed mr10">单价￥:</span>
          <span class="fontRed mr10">{{$v->price}} </span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <span class="fontGray mr20 ml5">x</span> 
          <span class="fontGray mr20 ml5" name="goods-buycnt"> {{$v->buycnt}}件</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <span class="fontRed mr10">小计￥:</span>
          <span class="fontRed mr10" name="goods-price">{{$v->price * $v->buycnt}}</span> 
          <!--节能补贴--> 
          <br /> 
          <br /> 
          <br /> 
          <p class="clearfix fuwu"> <span class="fl lh16" style="color:rgb(68, 156, 87);">支持7天无理由退货</span> </p> 
         </div> @endforeach 
        </div> 
        <div> 
        </div> </li> 
      </ul> 
     </div> 
    </div>
   </div> 
   <!-- 发票信息 --> 
   <!--提交订单-->     
   <div style="margin-left:70px;padding-top:30px;color:#888;"> 
    <span>邮寄至:</span> 
    <span style="font-size:20px" class="mr10" name="add-sheng"></span> 
    <span style="font-size:20px" class="mr10" name="add-shi"></span> 
    <span style="font-size:20px" class="mr10" name="add-xian"></span> 
    <span class="mr10 name_over2" name="add-addr" style="width: 300px;height: 20px;line-height:20px;font-size:20px; "></span> 
    <span style="font-size:20px" class="mr10" name="add-rec"></span> 
    <span style="font-size:20px" class="mr10" name="add-phone"></span> 
   </div> 
    
    <!-- 地址 id -->
   <input type="hidden" name="address-id" value="" /> 
   <!-- 支付方式 -->
    <input type="hidden" name="pay" value="" />
    <!-- 商品总价 -->
    <input type="hidden" name="total" value="" />
   

   <div class="container commitOrder" id="commitOrder"> 
     
    <div style="height:28px;"></div> 
   </div> 
   <div class="text-right play clearfix"> 
    <div class="w185 fr" id="id_commit_div"> 
     <button><a href="javascript:void%200" class="btn btn-primary btn-large fr" id="id_commit" style="border-bottom-right-radius: 0;">提交订单</a></button> 
    </div> 
    <span class="fr fontRed strong font16">应付款总金额 ￥：<span class="fr fontRed strong font16" style="font-size:25px" name="totalprice"></span> </span> 
    <span class="fl ml20" id="tq-yzm" g-pipe=""> </span> 
   </div> 
   <div style="height:50px"></div>
   {{csrf_field()}}
   </div> 
  </form>

<!--foot-->
    
    <!-- gome-aside -->
    <div id="gome-bar-border" style="display: none;">
        <ul id="gome-bar-border-tab" style="display: none; top: 200px;">
            <li class="gome-bar-btn-member" data-open="member"><b></b><i class="membericon"></i><a class="gome-bar-btn-tip" rel="nofollow" href="javascript:void(0);">国美会员</a></li>
            <li class="gome-bar-btn-cart" data-open="cart" id="gome-bar-btn-cart"><b class="car_arrow"></b><i class="caricon"></i><b class="car_num car_num_0"><s>0</s><span class="point"></span></b><span class="text">购物车</span></li>
            
            <li class="gome-bar-btn-favorites" data-open="favorites" id="gome-bar-btn-favorites"><b></b><i class="favorites-icon"></i><a class="gome-bar-btn-tip" href="javascript:void(0);">我的收藏</a></li>
        </ul>
    </div>
    <!-- gome-bar-border -->
   
        <!-- gome-bar-coupon -->
    </div>
    <!-- gome-bar-box -->
</div>

<!--[if lte IE 9]>
        <script type="text/javascript" src="//js.gomein.net.cn/gmpro/2.0.0/cart/1.0.0/js/js/common/placeholders.js"></script>    
    <![endif]-->




<script type="text/javascript" src="{{asset('/HomeCss/guo/conversion.js')}}">
</script><img alt="" src="{{asset('/HomeCss/guo/a_002.htm')}}" style="display:none" width="1" height="1" border="0">
<noscript></noscript></div></body></html>
@section('js')
 <script type="text/javascript" src='/jquery-1.8.3.min.js'></script>   
    <script type="text/javascript">
    // alert($);
            $.ajaxSetup({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                }
             });
            //添加收货地址

            $('.tjaddress').click(function(){
                  //alert(11111);
                var rec = $('input[name=rec]').val();
                var phone = $('input[name=phone]').val();
                var yb = $('input[name=yb]').val();
                var addr = $('textarea[name=addr]').val();
                var sheng = $('#sheng').val();
                var shi = $('#shi').val();
                var xian = $('#xian').val();
                // alert(phone);die;
                $.post('/home/address/insert',{rec:rec,phone:phone,yb:yb,addr:addr,sheng:sheng,shi:shi,xian:xian},function(data){
                    if(data == 0)
                    {
                       
                        //$('#myModal').modal('toggle');
                        //$('#myModal').css('display','none');
                        //动态加入模态框
                        //var link = $('');
                        //$('').append(link); 
                        alert('添加成功');
                        

                    }else{
                        alert('添加失败');
                    }
                    //location.reload();
                })



            })

            //选择收货地址

            $('.addname').find('li').click(function(){
                 // alert(11);
                //获取收件人信息
                var rec = $(this).find('span[name=recc]').html();
                var sheng = $(this).find('span[name=shengg]').html();
                var shi = $(this).find('span[name=shii]').html();
                var xian = $(this).find('span[name=xiann]').html();
                var addr = $(this).find('span[name=addrr]').html();
                var phone = $(this).find('span[name=phonee]').html();
                //获取当前选中id地址
                var id = $(this).attr('id');
                // alert(id);
                $('input[name=address-id]').val(id);

               $('span[name=add-rec]').html(rec);
               $('span[name=add-sheng]').html(sheng);
               $('span[name=add-shi]').html(shi);
               $('span[name=add-xian]').html(xian);
               $('span[name=add-addr]').html(addr);
               $('span[name=add-phone]').html(phone);
                $(this).addClass('list-group-item-danger').siblings().removeClass('list-group-item-danger');
            })


            

            //获取商品的总价 
                var totalprice = 0;
            $('.goodss').find('span[name=goods-price]').each(function(){
                totalprice += Number($(this).html());
            });

            $('span[name=totalprice]').html(totalprice);
            $('input[name=total]').val(totalprice);


            //支付方式
            $('.zhifu').click(function(){
                //alert(11);
                //将支付方式添加到表单中
                var pay = $(this).find('.name').html(); 
                // alert(pay);
                $('input[name=pay]').val(pay);
            })

            //判断收货地址 id 和支付方式是否选中 没选中 不能跳转下一页
           
            $('form').submit(function(){

                 var addressid = $('input[name=address-id]').val();
                 var addpay = $('input[name=pay]').val();
                 // alert(addressid);
                 // alert(addpay);
                 if(addressid && addpay){
                    return true;
                 }else{
                    alert('您还未填写地址或支付方式');  
                    return false;
                 }
                 
            })
            




            //收货地址删除
            $('.shanchu').click(function(){
                //获取id
                var id = $(this).parent('li').find('input[name=id]').val();
                // alert(id);
                $.post('/home/address/delete',{id:id},function(data){
                    if(data == 1){
                        alert('删除成功');
                        
                    }else{
                        alert('删除失败');
                    }
                })
            })



    </script>

@show